import Layout from '@/layout'

const marketingLayout = {
  alwaysShow: true,
  path: '/marketing',
  component: Layout,
  redirect: '/marketing/template/templateCenter',
  name: '营销管理',
  meta: {
    title: '营销管理',
    icon: '营销管理'
  },
  children: [
    {
      path: 'coupon',
      redirect: '/marketing/coupon/list',
      name: 'coupon',
      component: () => import('@/views/coupon/index'),
      meta: { title: '优惠券' },
      children: [
        {
          path: 'list',
          component: () => import('@/views/coupon/list/index'),
          name: 'CouponList',
          meta: { title: '优惠券列表', icon: '优惠券', noCache: true }
        },
        {
          hidden: true,
          path: 'couponEchart',
          component: () => import('@/views/coupon/echart'),
          name: 'couponEchart',
          meta: { title: '优惠券统计', activeMenu: '/coupon', noCache: true }
        }
      ]
    },
    {
      path: 'couponReceive',
      component: () => import('@/views/coupon/couponReceive/index'),
      name: 'CouponReceive',
      meta: { title: '优惠券名单', icon: '优惠券名单', noCache: true }
    },
    {
      path: 'coursedistribution',
      name: 'coursedistribution',
      hidden: true,
      redirect: '/marketing/coursedistribution/list',
      component: () => import('@/views/marketing'),
      meta: { title: '课程分销', noCache: true, icon: '课程分销' },
      children: [
        {
          path: 'list',
          hidden: true,
          component: () => import('@/views/marketing/list'),
          name: 'Marketingcourselist',
          meta: { title: '课程分销列表', noCache: true, activeMenu: '/marketing/coursedistribution' }
        }
      ]
    },
    {
      path: 'group',
      name: 'group',
      // hidden: true,
      component: () => import('@/views/marketing'),
      redirect: '/marketing/group/groupList',
      meta: { title: '活动管理', noCache: true, icon: '活动管理' },
      children: [
        {
          path: 'groupList',
          name: 'GroupList',
          hidden: true,
          component: () => import('@/views/marketing/groupList'),
          meta: { title: '活动列表', noCache: true, icon: '活动管理' }
        },
        {
          path: 'dataInfo',
          name: 'DataInfo',
          hidden: true,
          component: () => import('@/views/marketing/dataInfo'),
          meta: { title: '数据统计', noCache: true }
        }
      ]
    },
    {
      path: 'template',
      component: () => import('@/views/marketing/index'),
      name: 'Template',
      redirect: '/marketing/template/templateCenter',
      meta: { title: '模板中心', icon: '模板中心' },
      children: [
        {
          path: 'templateCenter',
          component: () => import('@/views/marketing/templateCenter/index'),
          name: 'TemplateCenter',
          meta: { title: '模板中心' }
        },
        {
          path: 'templateEdit',
          hidden: true,
          component: () => import('@/views/marketing/templateEdit'),
          name: 'templateEdit',
          meta: { title: '设计模板1' }
        },
        {
          path: 'templateEdit2',
          hidden: true,
          component: () => import('@/views/marketing/templateEdit2'),
          name: 'templateEdit2',
          meta: { title: '设计模板2' }
        },
        {
          path: 'templateEdit3',
          hidden: true,
          component: () => import('@/views/marketing/templateEdit3'),
          name: 'templateEdit3',
          meta: { title: '设计模板3' }
        }
      ]
    },
  ]
}
export default marketingLayout
